
#
# Music file class
#
class Tune
  owner_session_id: null
  requester_session_id: null
  name: null
  file: null

  #
  # constructor
  #
  constructor:(@file, @name, @owner_session_id)->

  #
  # set parameter
  #
  set:(new_tune)->
    @owner_session_id = new_tune.owner_session_id
    @requester_session_id = new_tune.requester_session_id
    @name = new_tune.name
    if @file is null
      @file = new_tune.file

    
  #
  # compare this and src
  #
  is_same_name_and_owner:(src)->
    src.owner_session_id is @owner_session_id and src.name is @name

